package com.mm.cloud.common.security.interceptor;

import com.mm.cloud.common.security.helper.LoginUserHelper;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Component;
import org.springframework.web.servlet.HandlerInterceptor;


/**
 * 清除本地缓存拦截器
 *
 * @author mr
 * @since 2023-04-05
 */
@Component
public class SecurityInterceptor implements HandlerInterceptor {

    @Override
    public void afterCompletion(HttpServletRequest request, HttpServletResponse response, Object handler, Exception ex) throws Exception {
        LoginUserHelper.cleanLoginUser();
    }

}
